<!--
 * @Author: xiaobaobeibai 604070135@qq.com
 * @Date: 2022-08-01 22:49:37
 * @LastEditors: smallWhite
 * @LastEditTime: 2024-04-07 11:41:03
 * @FilePath: /huizhou_website_admin/src/views/about_us/company_profilees/components/list.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

<template>
  <div>
    <div style="height:30px">
      <el-breadcrumb
        separator-class="el-icon-arrow-right">
        <el-breadcrumb-item
          :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>集团简介</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-card shadow="never"
      class="mb20">
      <div slot="header">
        <el-button
          type="primary"
          @click="$refs.show.open(conpanyObj)">编辑集团简介</el-button>
      </div>
      <div
        class="companyProfile_box">
        <div class="concats"
          v-html="conpanyObj.concat" />
      </div>
    </el-card>
    <ModalView ref="show"
      @ok="getTableList" />
  </div>
</template>

<script>
import { REQUEST_LIST } from '@/api/requestList'
import ModalView from './modal.vue'
export default {
  name: 'ActiveList',
  components: { ModalView },
  data() {
    return {
      imgUrl: '',
      conpanyObj: {}
    }
  },
  mounted() {
    this.getTableList()
  },
  methods: {
    /**
     * @description: 获取数据列表
     * @param {type}
     * @return:
     */
    getTableList() {
      this.tableLoading = true
      REQUEST_LIST.REQUST_FCN('CONPANYONE', {}, true).then(res => {
        this.conpanyObj = res.data.companyProfile.filter(item => {
          if (item.type === 1) {
            return item.type === 1
          }
        })[0]
        this.conpanyObj.imgUrl = 'http://img.fjmxjt.cn/' + this.conpanyObj.img
        this.tableLoading = false
        console.log(this.conpanyObj, '0000')
        // if (this.conpanyObj.concat.includes('\t')) {
        //   this.conpanyObj.concat = this.conpanyObj.concat.replace(/\t/g, '&nbsp;&nbsp;')
        // }
      })
    },
    /**
     * @description: 重置
     * @param {type}
     * @return:
     */
    reset() {
      this.pageNum = 1
      this.queryParam.id = ''
      this.getTableList()
    },
    /**
     * @description: 翻页函数
     * @page {number}
     * @pageSize {number}
     * @return:
     */
    changePage(data) {
      this.pageNum = data.pageNum
      this.pageSize = data.pageSize
      this.getTableList()
    },
    go(data) {
      this.$emit('go', data)
    },
    editTable(e) {
      this.$refs.show.open('edit', e)
    }
  }
}
</script>
<style>
.companyProfile_box {
  overflow: hidden;
}
.companyProfile_box p span {
  display: block;
  line-height: 1.7;
  text-indent: 2em;
}
font[size='1'] {
  font-size: 14px !important;
}
font[size='2'] {
  font-size: 15px !important;
}
font[size='3'] {
  font-size: 16px !important;
}
font[size='4'] {
  font-size: 18px !important;
}
font[size='5'] {
  font-size: 24px !important;
}
font[size='6'] {
  font-size: 32px !important;
}
</style>
